libmymethod.so:add.o sub.o
	gcc -o $@ $^ -shared
%.o:%.c
	gcc -fPIC -c $<

.PHONY:output
output:
	mkdir -p dylib/include
	mkdir -p dylib/mylib
	cp -f *.h dylib/include
	cp -f *.so dylib/mylib
	tar czf dylib.tgz dylib

.PHONY:clean
clean:
	rm *.o *.so
